home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm5_3_5
- Caption = "Analyze First Character of a String"
- ClientHeight = 1275
- ClientLeft = 1230
- ClientTop = 1710
- ClientWidth = 5790
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1275
- ScaleWidth = 5790
- Begin VB.PictureBox picResult
- Height = 495
- Left = 1440
- ScaleHeight = 435
- ScaleWidth = 4155
- TabIndex = 2
- Top = 600
- Width = 4215
- End
- Begin VB.CommandButton cmdAnalyze
- Caption = "Analyze"
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 600
- Width = 1215
- End
- Begin VB.TextBox txtString
- Height = 285
- Left = 1560
- TabIndex = 0
- Text = " "
- Top = 120
- Width = 4095
- End
- Begin VB.Label lblEnter
- Caption = "Enter any string"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 120
- Width = 1455
- End
- Attribute VB_Name = "frm5_3_5"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdAnalyze_Click()
- Dim anyString As String
- 'Analyze the first character of a string
- picResult.Cls
- anyString = UCase(txtString.Text)
- Select Case Left(anyString, 1)
- Case "S", "Z"
- picResult.Print "The string begins with a sibilant."
- Case "A" To "Z"
- picResult.Print "The string begins with a nonsibilant."
- Case "0" To "9"
- picResult.Print "The string begins with a digit."
- Case Is < "0"
- picResult.Print "The string begins with a character of ANSI"
- picResult.Print "value less than 48 (e.g. +, &, #, or %)."
- Case Else
- picResult.Print "The string begins with one of the following:"
- picResult.Print " : ; < = > ? @ [ / ] ^ _ '"
- End Select
- End Sub
-